package cn.homework.day08;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Stream;

public class Test06 {
    public static void main(String[] args) {
        Integer[] a = {1, 2, 3, 4, 5};
        Stream<Integer> st = Arrays.stream(a);
        List<Integer> integers = st.toList();
        HashMap<Integer, Integer> map = new HashMap<>();
        for (Integer integer : integers) {
            map.put(integer, integer * integer);
        }
        System.out.println(map);
        Integer[] i1 = map.values().toArray(new Integer[map.size()]);
        for (Integer integer : i1) {
            System.out.println(integer);
        }

    }
}
